package utility.webmailclient.app.servlet.test;

import com.thoughtworks.selenium.SeleneseTestCase;

public class RegistrationTestCase extends SeleneseTestCase {
	public void setUp() throws Exception {
		setUp("http://localhost:8080/", "*chrome");
	}
	public void testRegistrationTestCase() throws Exception {
		
selenium.open("/webmailclient/register.disp");
assertEquals("Success", selenium.getAlert());
assertEquals("No.of Questions Retrived =1", selenium.getAlert());
assertEquals("Registration Form", selenium.getTitle());
for (int second = 0;; second++) {
	if (second >= 60) fail("timeout");
	try { if (selenium.isTextPresent("exact:Select a QuestionWhat is your first mobile number ?")) break; } catch (Exception e) {}
	Thread.sleep(1000);
}

verifyTrue(selenium.isTextPresent("exact:Select a QuestionWhat is your first mobile number ?"));
	}
}
